﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Reminder
{
    public partial class Form2 : Form
    {
        public int Interval
        {
            get;
            set;
        }

        public Form2(int interval)
        {
            InitializeComponent();

            Interval = interval;
            textBox1.Text = Interval.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var interval = int.Parse(textBox1.Text);
            if (Interval < 1 || Interval > 60) 
            {
                textBox1.Text = Interval.ToString();
                return;
            }
            Interval = interval;
            Close();
        }
    }
}
